#include <stdio.h>

#define N_MAX       20 // 每N_MAX个字符分割一次，不到N_MAX个时如果遇到 \t 就用空格补到 N_MAX
#define SPLIT_FLAG  '|'
#define FILL_CHAR   '_'

int detab() {

    int index, n, c;
    index = 0;

    while ((c = getchar()) != EOF) {
        if (c == '\n') {
            continue;
        }
        if (c == '\t') {
            // fill character , set i = 0.
            int fn = N_MAX - index;
            for (int i = 0; i < fn; i++) {
                putchar(FILL_CHAR);
            }
            putchar(SPLIT_FLAG);
            index = 0;
        } else {

            putchar(c);
            index++;
            if (index == N_MAX) {
                putchar(SPLIT_FLAG);
                index = 0;
            }
        }
    }

}
